import Vue from 'vue'
import App from './App.vue'
// 1.引入重置样式
import './assets/css/reset.css'
import './assets/css/adapter.css'
import './assets/font/iconfont.css'
import store from './store'
import 'animate.css'
import { Button } from 'vant';
Vue.use(Button);
// 2.引入rem.js
// import './assets/js/rem'
// 3.引入router
import router from './router'
// 4.实现全局组件的封装
// import GoBack from './components/GoBack.vue'
// import Search from './components/Search.vue'
// Vue.component('GoBack',GoBack);
// Vue.component('Search',Search);

// 4.全局组件封装优化
import comComponents from './components'
// comComponents = {
//   GoBack:GoBack,
//   Search:Search
// }
for(let i in comComponents){
  Vue.component(i,comComponents[i]);
}

// 5.封装全局过滤器
import comFilters from './filters'
// comFilters = {
//   priceFilter:priceFilter
// }
for(let i in comFilters){
  Vue.filter(i,comFilters[i])
}

import Vant from 'vant';
import 'vant/lib/index.css';

Vue.use(Vant);

Vue.prototype.$pregImg = "http://localhost:3000"

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
